home *** CD-ROM | disk | FTP | other *** search
/ Gekikoh Dennoh Club 1 / Gekikoh Dennoh Club Vol. 1 (Japan).7z / Gekikoh Dennoh Club Vol. 1 (Japan) (Track 1).bin / kowin / archive / sys / kowin14d.lzh / include / microfio.h < prev    next >
C/C++ Source or Header  |  1995-10-31  |  1KB  |  50 lines

  1. /*    Copyright 1993 H.Ogasawara (COR.)    */
  2.  
  3. #ifndef __MICROFIO__
  4. #define    __MICROFIO__
  5.  
  6. #ifndef __dos_inline_call__
  7. # include    <sys_doslib.h>
  8. #endif
  9.  
  10. #define    MFBUFSIZE    4096
  11.  
  12. typedef    struct {
  13.         int    fn;
  14.         unsigned char    *ptr;
  15.         unsigned char    *limit;
  16.         unsigned char    buf[MFBUFSIZE];
  17.     } m_file;
  18.  
  19. #ifndef __MicroLIB__
  20.  
  21. extern int    Mopen( m_file*, const char* );
  22. extern int    Mcreate( m_file*, const char* );
  23. extern int    Mappend( m_file*, const char* );
  24. #define        Mclose( fm )    (CLOSE((fm)->fn))
  25. extern int    Mgets( m_file*, char*, int );
  26. extern int    Mputs( m_file*, const char* );
  27. extern int    Mread( m_file*, void*, int );
  28. extern int    Mwrite( m_file*, const void*, int );
  29. extern void    Mflush( m_file* );
  30. extern void    Mseekl( m_file*, int );
  31. #define        Mseek( fm, pos, mode )    (SEEK((fm)->fn,pos,mode))
  32. extern int    Mgetc( m_file* );
  33. extern int    MMgetc( m_file* );
  34. extern int    Mputc( m_file*, const int );
  35. extern int    MMputc( m_file*, const int );
  36. extern int    Mputw( m_file*, const int );
  37. extern int    Mputl( m_file*, const int );
  38. extern int    Mgetl( m_file* );
  39. extern int    Mgetw( m_file* );
  40. extern int    Mfsize( m_file* );
  41. extern void    *MallocRead( const char* );
  42. extern void    *MallocReadOffset( const char*, int );
  43. extern void    *MallocReadTopOffset( const char*, int );
  44. #define        MallocSize( ptr )    (((int*)(ptr))[-2]-(int)(ptr))
  45. extern int    McreateWrite( const char*, const void*, int );
  46.  
  47. #endif
  48.  
  49. #endif
  50.